package spade;
import java.util.Vector;

public class ACLTemplate
{
	/*
	 * Template for message matching
	 */

	String	    performative	= "";
	AID	        sender;
	Vector<AID>	receivers;
	Vector<AID>	reply_to;
	String	    content	        = "";
	String	    reply_with	    = "";
	String	    reply_by	    = "";
	String	    in_reply_to	    = "";
	String	    encoding	    = "";
	String	    language	    = "";
	String	    ontology	    = "";
	String	    protocol	    = "";
	String	    conversation_id	= "";


	/*
	 * self.content = None self.reply_with = None self.reply_by = None
	 * self.in_reply_to = None self.encoding = None self.language = None
	 * self.ontology = None self.protocol = None self.conversation_id = None
	 */

	// public __init__(self, performative=None){
	protected void init()
	{
		performative = "";
		sender = new AID();
		receivers = new Vector<AID>();
		reply_to = new Vector<AID>();
		content = "";
		reply_with = "";
		reply_by = "";
		in_reply_to = "";
		encoding = "";
		language = "";
		ontology = "";
		protocol = "";
		conversation_id = "";
	}
	public ACLTemplate()
	{
		init();
	};

	public ACLTemplate(String perf)
	{
		this();
		performative = perf;
	};


	// public reset(self){
	public void reset()
	{
		init();
	};


	// public setSender(self, sender){
	public void setSender(AID sen)
	{
		sender = sen;
	};


	// public getSender(self){
	public AID getSender()
	{
		return sender;
	};


	// public addReceiver(self, recv){
	public void addReceiver(AID recv)
	{
		receivers.add(recv);
	};


	// public removeReceiver(self, recv){
	public void removeReceiver(AID recv)
	{
		if (receivers.contains(recv))
		{
			receivers.remove(recv);
		}
		;
	};


	// public getReceivers(self){
	public Vector<AID> getReceivers()
	{
		return receivers;
	};


	// public addReplyTo(self, re){
	public void addReplyTo(AID re)
	{
		reply_to.add(re);
	};


	// public removeReplyTo(self, re){
	public void removeReplyTo(AID re)
	{
		reply_to.remove(re);
	};


	// public getReplyTo(self){
	public Vector<AID> getReplyTo()
	{
		return reply_to;
	};


	// public setPerformative(self, p){
	public void setPerformative(String p)
	{
		performative = p;
	};


	// public getPerformative(self){
	public String getPerformative()
	{
		return performative;
	};

	public void setContent(String c)
	{
		content = c;
	};

	public String getContent()
	{
		return content;
	};

	public void setReplyWith(String rw)
	{
		reply_with = rw;
	};

	public String getReplyWith()
	{
		return reply_with;
	};

	public void setInReplyTo(String reply)
	{
		in_reply_to = reply;
	};

	public String getInReplyTo()
	{
		return in_reply_to;
	};

	public void setEncoding(String e)
	{
		encoding = e;
	};

	public String getEncoding()
	{
		return encoding;
	};

	public void setLanguage(String e)
	{
		language = e;
	};

	public String getLanguage()
	{
		return language;
	};

	public void setOntology(String o)
	{
		ontology = o;
	};

	public String getOntology()
	{
		return ontology;
	};

	public void setReplyBy(String e)
	{
		reply_by = e;
	};

	public String getReplyBy()
	{
		return reply_by;
	}

	public void setProtocol(String e)
	{
		protocol = e;
	}

	public String getProtocol()
	{
		return protocol;
	}

	public void setConversationId(String e)
	{
		conversation_id = e;
	}

	public String getConversationId()
	{
		return conversation_id;
	}
}
